<h3>Viewing recipies for <?php echo $this->user['name'] ?></h3>

<table>
	<thead>
		<tr>
			<td><?php echo $this->sortOrder( 'name', 'Name', $this->searchCriteria); ?></td>
			<td><?php echo $this->sortOrder( 'total_time', 'Total Time', $this->searchCriteria); ?></td>
			<td><?php echo $this->sortOrder( 'serves', 'Serves', $this->searchCriteria); ?></td>
			<td><?php echo $this->sortOrder( 'diffficulty', 'Difficulty', $this->searchCriteria); ?></td>
			<td><?php echo $this->sortOrder( 'freezable', 'Freeze', $this->searchCriteria); ?></td>
			<td><?php echo $this->sortOrder( 'comments_count', 'Comments', $this->searchCriteria); ?></td>
			<!-- <td>Rated</td> -->
			<td><?php echo $this->sortOrder( 'view_count', 'Views', $this->searchCriteria); ?></td>
		</tr>
	</thead>
	<tbody>
	<?php foreach( $this->paginator as $recipe ): ?>
		<tr class="<?php echo $this->cycleCss(); ?>">
			<td><a href="<?php echo $this->url( array( 
				'controller' => 'recipe', 
				'action' => 'view',
				'id'     => $recipe['id']
			), 'default', true ); ?>"><?php echo $recipe['name']; ?></a></td>
			<td class="numeric"><?php echo minsToWords($recipe['total_time']); ?></td>
			<td class="numeric"><?php echo $recipe['serves']; ?></td>
			<td class="numeric"><?php echo $recipe['difficulty']; ?></td>
			<td class="center"><?php echo ($recipe['freezable'] ? 'Yes' : 'No'); ?></td>
			<td class="numeric"><?php echo $recipe['comments_count']; ?></td>
			<!-- <td></td> -->
			<td class="numeric"><?php echo $recipe['view_count']; ?></td>
		</tr>
	<?php endforeach ?>
	</tbody>
</table>

<?php echo $this->paginationControl($this->paginator, 'Sliding', 'includes/pagination.php'); ?>
